<table>
	<tr>
		<th colspan="2"><?php echo show($action->getTitre());
								if($contacter == 'enseignant' || $contacter == 'administrateur')
								{
									if($etudiants != null)
										echo '<a href="'.base_url().'index.php/ActionsDeCommunication/contacter/all/all/'.$action->getId().'">
																<button class="enveloppe" type="button"></button>
											  </a>';
								}
								if($contacter == 'etudiant')
								{
									if($action->getEnseignant() != null || isset($etudiants[1]))
										echo '<a href="'.base_url().'index.php/ActionsDeCommunication/contacter/all/all/'.$action->getId().'">
																<button class="enveloppe" type="button"></button>
											  </a>';
								}
						?>
		</th>
	</tr>
	<tr>
		<td><b>Thème : </b><?php echo $action->getTheme()->getLibelle();?></td>
		<td><b>Enseignant : </b>
			<?php 
				if($action->getEnseignant() != null)
				{
					echo strtoupper($action->getEnseignant()->getNom()).' '.ucwords($action->getEnseignant()->getPrenom());
					if($contacter == 'etudiant' || $contacter == 'administrateur')
						echo '<a href="'.base_url().'index.php/ActionsDeCommunication/contacter/enseignant/'.$action->getEnseignant()->getLogin().'/'.$action->getId().'">
												<button class="enveloppe" type="button"></button>
							  </a>';
				}
			?>
		</td>
	</tr>
	<tr>
		<td>
			<b>Nombre d'étudiants :</b> <?php echo $action->getNombreEtudiantMax();?><br/>
			<b>Nombre de places restantes :</b> <?php echo $action->getNombreEtudiant();?><br/>
		</td>
		<td>
			<b>Date : </b>
			<?php 
				if($action->getDate() != null)
					echo putDateJJMMAAAA($action->getDate());
			?>
			<br>
			<b>Date limite d'inscription : </b>
			<?php 
				if($action->getDateLimiteInscription() != null)
					echo putDateJJMMAAAA($action->getDateLimiteInscription());
			?>
			<br>
			<b>Points max attribués : </b><?php echo $action->getNoteMax();?><br/>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<b>Participants inscrits :</b>
			<ul>
				<?php 
					if($etudiants)
					{
						foreach($etudiants as $etudiant)
						{
							echo '<li>'.strtoupper($etudiant->getNom()).' '.ucwords($etudiant->getPrenom()).' '.strtoupper($etudiant->getGroupe());
							if( ($contacter == 'enseignant' || $contacter == 'administrateur') || ($contacter == 'etudiant' && $etudiant->getId() != $utilisateur->getId()))
								echo '<a href="'.base_url().'index.php/ActionsDeCommunication/contacter/etudiant/'.$etudiant->getId().'/'.$action->getId().'">
											<button class="enveloppe" type="button"></button>
									  </a>';
							echo '</li>';
						}
					}
				?>
			</ul>
		</td>
	</tr>
			
	<tr>
		<td colspan="2">
			<b>Commentaire :</b><br/>
			<?php 
				echo show($action->getCommentaire());
			?>
		</td>
	</tr>
</table>